package cn.com.guage.dtm.stat.service.impl;

import java.util.List;
import cn.com.guage.dtm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.com.guage.dtm.stat.mapper.StatDataExploreDetailMapper;
import cn.com.guage.dtm.stat.domain.StatDataExploreDetail;
import cn.com.guage.dtm.stat.service.IStatDataExploreDetailService;
import cn.com.guage.dtm.common.core.text.Convert;

/**
 * 数据探索详情Service业务层处理
 * 
 * @author yangdechao
 * @date 2021-07-22
 */
@Service
public class StatDataExploreDetailServiceImpl implements IStatDataExploreDetailService 
{
    @Autowired
    private StatDataExploreDetailMapper statDataExploreDetailMapper;

    /**
     * 查询数据探索详情
     * 
     * @param exploreDetailId 数据探索详情ID
     * @return 数据探索详情
     */
    @Override
    public StatDataExploreDetail selectStatDataExploreDetailById(Long exploreDetailId)
    {
        return statDataExploreDetailMapper.selectStatDataExploreDetailById(exploreDetailId);
    }

    /**
     * 查询数据探索详情列表
     * 
     * @param statDataExploreDetail 数据探索详情
     * @return 数据探索详情
     */
    @Override
    public List<StatDataExploreDetail> selectStatDataExploreDetailList(StatDataExploreDetail statDataExploreDetail)
    {
        return statDataExploreDetailMapper.selectStatDataExploreDetailList(statDataExploreDetail);
    }

    /**
     * 新增数据探索详情
     * 
     * @param statDataExploreDetail 数据探索详情
     * @return 结果
     */
    @Override
    public int insertStatDataExploreDetail(StatDataExploreDetail statDataExploreDetail)
    {
        statDataExploreDetail.setCreateTime(DateUtils.getNowDate());
        return statDataExploreDetailMapper.insertStatDataExploreDetail(statDataExploreDetail);
    }

    /**
     * 修改数据探索详情
     * 
     * @param statDataExploreDetail 数据探索详情
     * @return 结果
     */
    @Override
    public int updateStatDataExploreDetail(StatDataExploreDetail statDataExploreDetail)
    {
        statDataExploreDetail.setUpdateTime(DateUtils.getNowDate());
        return statDataExploreDetailMapper.updateStatDataExploreDetail(statDataExploreDetail);
    }

    /**
     * 删除数据探索详情对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteStatDataExploreDetailByIds(String ids)
    {
        return statDataExploreDetailMapper.deleteStatDataExploreDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除数据探索详情信息
     * 
     * @param exploreDetailId 数据探索详情ID
     * @return 结果
     */
    @Override
    public int deleteStatDataExploreDetailById(Long exploreDetailId)
    {
        return statDataExploreDetailMapper.deleteStatDataExploreDetailById(exploreDetailId);
    }
}
